﻿Imports System.Data.SqlClient


Public Class DBConnect
    Private connectionStr As String
    Shared singleInstance As DBConnect = Nothing
    Private connection As SqlConnection

    Private Sub New()
        'connection = New SqlConnection("Data Source=MS-20161023LMHJ;Initial Catalog=exam;User ID=sa;Password=exam")
        connection = New SqlConnection("Data Source=localhost;Initial Catalog=exam;User ID=sa;Password=exam")

    End Sub

    Public Shared ReadOnly Property GetInstance() As DBConnect
        Get
            If singleInstance Is Nothing Then
                singleInstance = New DBConnect
            End If
            Return singleInstance
        End Get
    End Property


End Class
